// 装备维修
import request from "@/api/request";

// 分页查询所有装备维修单
export const query_zbRepairbill = (params) => {
  return request({
    url: "/equipmanage/erc/selectAll",
    method: "post",
    data: params,
  });
};

//   删除
export const delete_zbRepairbill = (params) => {
  return request({
    url: "/equipmanage/erc/delete/" + params,
    method: "post",
  });
};

// 新增
export const add_zbRepairbill = (params) => {
  return request({
    url: "/equipmanage/erc/insert",
    method: "post",
    data: params,
    headers: { "Content-Type": "application/json;charset=UTF-8" },
  });
};

//  修改
export const update_zbRepairbill = (params) => {
  return request({
    url: "/equipmanage/erc/update",
    method: "post",
    data: params,
    headers: { "Content-Type": "application/json;charset=UTF-8" },
  });
};

//   查找详情
export const detials_zb = (params) => {
  return request({
    url: "/equipmanage/erc/selectDetails/" + params,
    method: "post",
  });
};

// 用户列表
export const userList_zb = (params) => {
  return request({
    url: "/equipmanage/erc/userList/" + params,
    method: "post",
  });
};

// 机构列表
export const orgList_zb = () => {
  return request({
    url: "/equipmanage/erc/orgList",
    method: "post",
  });
};

// 保障机构列表
export const proOrgList_zb = () => {
  return request({
    url: "/equipmanage/erc/proOrgList",
    method: "post",
  });
};
// 装备列表
export const equipList_zb = () => {
  return request({
    url: "/equipmanage/erc/equipList/",
    method: "post",
  });
};

// 提交
export const submit_zb = (params) => {
  return request({
    url: "/equipmanage/erc/commit",
    method: "post",
    data: params,
    headers: { "Content-Type": "application/json;charset=UTF-8" },
  });
};

//   审核
export const audit_zb = (params) => {
  return request({
    url: "/equipmanage/erc/audit",
    method: "post",
    data: params,
    headers: { "Content-Type": "application/json;charset=UTF-8" },
  });
};

//   审核历史
export const history_zb = (params) => {
  return request({
    url: "/equipmanage/erc/getAuditHistory",
    method: "post",
    data: params,
  });
};

//   回退
export const undo_zb = (params) => {
  return request({
    url: "/equipmanage/erc/undo",
    method: "post",
    data: params,
  });
};

//   作废单据
export const cancel_zb = (params) => {
  return request({
    url: "/equipmanage/erc/cancel",
    method: "post",
    data: params,
  });
};

// 删除子表
export const delete_son = (params) => {
  return request({
    url: "/equipmanage/eadc/delete/" + params,
    method: "post",
  });
};

// 单别
export const category_zballot = (params) => {
  return request({
    url: "/equipmanage/allot/equip/ordCategoryList/" + params,
    method: "post",
  });
};

// 来源单号列表
export const query_orderNumberList = (params) => {
  return request({
    url: "/equipmanage/erc/orderNumberList/" + params,
    method: "post",
    data: params,
  });
};

// 维修等级
export const query_maintenanceLevel = (params) => {
  return request({
    url: "/equipmanage/erc/repairList",
    method: "post",
    data: params,
  });
};
